﻿#pragma once

#include <string>
class Texture
{
private:
	unsigned int m_id;
	unsigned int m_texture_renderer_id;		 // 纹理渲染器ID
	std::string m_file_path;				 // 图像文件路径
	unsigned char* m_local_buffer;			 // 本地缓冲区
	int m_width, m_height, m_bits_per_pixel; // 图像宽度、高度、位深度
	// m_internal_format, m_image_format, m_wrap_s, m_wrap_t, m_filter_min, m_filter_max

public:
	Texture(const std::string& filename, uint32_t id = 1);
	~Texture();

	void bind(unsigned char slot = 0) const;
	void unbind() const;

	inline unsigned int get_renderer_id() const { return m_texture_renderer_id; }
	inline int get_width() const { return m_width; }
	inline int get_height() const { return m_height; }
	inline int get_bits_per_pixel() const { return m_bits_per_pixel; }
};